<template>
	<view v-if="workOrderLogList.length" class="flow">
		<!-- <u-collapse :value="['2']">
			<u-collapse-item name="2" title="流程"> -->
			<!-- style="margin-top: 60rpx;" -->
			  <view>
				<view class="flow-title">流程</view>
				<view v-for="(item, index) in workOrderLogList" :key="index" class="flow-content">
					<view class="state">
						<view class="state-content">
							<view class="state-title">{{ item.operationType }}</view>
							<view v-if="item.reviewState" class="state-label">
								<view>{{ item.reviewState }}</view>
							</view>
						</view>
						<view class="date">{{ getDate(item.operationDate) }}</view>
					</view>
					<view class="name">{{ item.operationUserName }}</view>
					<view v-if="item.operationContent" class="idea">
						<view class="idea-title">審核意見：</view>
						<view class="idea-info">{{ item.operationContent }}</view>
					</view>
				</view>
			  </view>
		<!-- 	</u-collapse-item>
		</u-collapse> -->
	</view>
</template>

<script>
	import mixins from '@/utils/mixins.js';
	export default {
		props:{
			workOrderLogList:{
				type:Array,
				default:()=>[]
			}
		},
		mixins:[mixins],
		data() {
			return {}
		},
	}
</script>

<style lang="scss" scoped>
	.flow {
		border-top: 30rpx solid #f5f7fa;
		.flow-title {
			color: #22204e;
			line-height: 50rpx;
			padding:  36rpx 30rpx 60rpx;
			font-size: 36rpx;
			font-weight: bold;
		}
		.flow-content {
			border-left: 2rpx dashed #86b5fb;
			padding-left: 40rpx;
			margin: 0rpx 52rpx 0 84rpx;
			position: relative;
			&::before {
				content: "";
				position: absolute;
				top: -16rpx;
				left: -16rpx;
				width: 32rpx;
				height: 32rpx;
				background: radial-gradient(#2f80ed 45%, rgba(47, 128, 237, 0.3) 45%);
				border-radius: 50%;
			}
			&:last-child {
				&::after {
					content: "";
					position: absolute;
					bottom: -16rpx;
					left: -16rpx;
					width: 20rpx;
					height: 40rpx;
					background: #fff;
				}
			}
			.state {
				display: flex;
				align-items: center;
				justify-content: space-between;
				height: 66rpx;
				transform: translateY(-32rpx);
				.state-content {
					display: flex;
					align-items: center;
					.state-title {
						color: #2f80ed;
						font-size: 36rpx;
						font-weight: bold;
						margin-right: 20rpx;
					}
					.state-label {
						background: linear-gradient( 90deg, #FF2B2B 0%, #FF603D 100%);
						border-radius: 4rpx;
						color: #fff;
						font-weight: bold;
						font-size: 28rpx;
						transform: skewX(-20deg);
						padding: 0 12rpx;
						border-radius: 8rpx;
						view {
							 transform: skewX(20deg);
						}
					}
				}
				.date {
					color: #6a819e;
					font-weight: 500;
					font-size: 26rpx;
				}
			}
			.name {
				color: #4b5664;
				font-size: 32rpx;
				font-weight: bold;
				line-height: 44rpx;
				padding-bottom: 32rpx;
				transform: translateY(-20rpx);
			}
			.idea {
				font-size: 32rpx;
				font-weight: bold;
				padding-bottom: 32rpx;
				transform: translateY(-20rpx);
				.idea-title {
					color: #22204e;
					margin-bottom: 8rpx;
					line-height: 44rpx;
				}
				.idea-info {
					color: #778599;
					line-height: 52rpx;
				}
			}
		}
	}
	/* #ifdef MP-WEIXIN */
	::v-deep .u-collapse-item {
		.u-cell__title-text {
			font-size: 36rpx;
			color: #22204e;
			font-weight: bold;
		}
	}
	/* #endif */

</style>